﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Bostik
{
    public partial class FrmPrincipal : Form
    {
         
        private IniciaMDI menu;
        public FrmPrincipal()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            menu = new IniciaMDI(this);
            var BD = new ConexionBD();
            //BD.ConectarToDB();
        }

        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            menu.ActivarFormulario(new Frm_Clientes(),false,true);

        }

        private void localesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            menu.ActivarFormulario(new Frm_Predios(),false,true);
        }

        private void clientesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            
            menu.ActivarFormulario(new Frm_Clientes(),true,true);
            
        }

        private void localesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            menu.ActivarFormulario(new Frm_Predios(),true,true);
        }

        private void clientesToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            menu.ActivarFormulario(new Frm_Consulta_Clientes_Factura(),true,false);
        }

        private void localesToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            menu.ActivarFormulario(new Frm_Consulta_Predios_Contrato(),true,false);
        }

        private void configuracionToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            menu.ActivarFormulario(new Frm_Configuracion(),false,false);
        }

        private void clientesPagosVencidosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            menu.ActivarFormulario(new Frm_Consulta_Clientes_Vencidos(),true,false);
        }

        private void reporteClientesToolStripMenuItem_Click(object sender, EventArgs e)
        { 
            menu.ActivarFormulario(new Frm_Consulta_Clientes(),true,false);  
        }

        private void FrmPrincipal_FormClosed(object sender, FormClosedEventArgs e)
        {

            Application.Exit();
        }
    }
}
